﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.Master" AutoEventWireup="true" CodeBehind="BGM_ProjectChangeJobSite.aspx.cs" Inherits="KPIS.GERP.GBMS.APP_UI.Form.BGM_ProjectChangeJobSite" %>

<asp:Content ID="Content2" runat="server" contentplaceholderid="head">
    <title>ย้ายโครงการ</title>
    <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" >
    </telerik:RadAjaxLoadingPanel>
            
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="dtgProjectJobSite">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="dtgProjectJobSite" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <div>
        <div class="header-grid">
            ย้ายโครงการ
        </div>
        <div class="DivBody">
            <table>
                <tr>
                    <td>
                        โครงการของปี :
                    </td>
                    <td>
                        <telerik:RadNumericTextBox ID="txtBgmYear" runat="server" AutoPostBack="true"
                            NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator=""
                            ShowSpinButtons="true" Width="80px"
                            MinValue="2500" MaxLength="3000" ontextchanged="txtBgmYear_TextChanged" />
                    </td>
                </tr>
            </table>
        </div>
        <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="dtgProjectJobSite" runat="server" 
            AutoGenerateColumns="False" Width="100%"  AllowMultiRowSelection="True"
            AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" PageSize="10"
            OnNeedDataSource="dtgProjectJobSite_NeedDataSource" 
            OnItemCommand="dtgProjectJobSite_ItemCommand"
            ><%--OnSelectedIndexChanged="dtgProjectJobSite_SelectedIndexChanged" --%>
            <MasterTableView NoMasterRecordsText="... ไม่มีข้อมูล ..."
                CommandItemDisplay="none" DataKeyNames="Sequence" Width="100%">
                <Columns>
                    <telerik:GridBoundColumn DataField="Sequence" UniqueName="Sequence" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="job_site_seq" UniqueName="job_site_seq" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                        CurrentFilterFunction="Contains" 
                        DataField="bgm_proj_code" 
                        FilterControlWidth="100%" 
                        HeaderText="รหัสโครงการ" 
                        ShowFilterIcon="false" 
                        UniqueName="bgm_proj_code" Visible="true">
                        <HeaderStyle HorizontalAlign="Center" Width="120px"/>
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                        CurrentFilterFunction="Contains" 
                        DataField="bgm_prj_name" 
                        FilterControlWidth="100%" 
                        HeaderText="ชื่อโครงการ" 
                        ShowFilterIcon="false" 
                        UniqueName="bgm_prj_name" Visible="true">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Left" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                        CurrentFilterFunction="Contains" 
                        DataField="total_amount" 
                        FilterControlWidth="100%" 
                        HeaderText="จำนวนเงิน(บาท)" 
                        ShowFilterIcon="false" 
                        DataFormatString="{0:N2}"
                        UniqueName="total_amount" Visible="true">
                        <HeaderStyle HorizontalAlign="Center" Width="120px"/>
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
 
                    <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                        CurrentFilterFunction="Contains" 
                        DataField="job_site_name" 
                        FilterControlWidth="100%" 
                        HeaderText="หน่วยงานเจ้าของงบประมาณ" 
                        ShowFilterIcon="false" 
                        UniqueName="job_site_name">
                        <HeaderStyle HorizontalAlign="Center" Width="150px"/>
                        <ItemStyle HorizontalAlign="Left" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbnEdit" runat="server" Text='<%# Eval("job_site_name") %>' CommandName="GridSelect" ForeColor="Blue" />
                            <telerik:RadComboBox ID="ddlJobSiteSeq" runat="server"
                                DataTextField="text" DataValueField="value"
                                Filter="Contains" Visible="false" />
                            <asp:LinkButton ID="lbnSave" runat="server" Text="บันทึก" CommandName="GridSave" Visible="false" ForeColor="Blue" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="false" />
            </ClientSettings>
        </telerik:RadGrid>
    </div>
</asp:Content>